package com.neusoft.neuiotms.dcom.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "neuiot_duty_arrangement_result", comment = "值班结果组表")
@Table(name = "neuiot_duty_arrangement_result")
public class DutyArrangementResult extends AbstractModel {

    private static final long serialVersionUID = 1L;

    /** 开始时间 */
    @Column(length = 6, nullable = false)
    @Comment("datetime(6) NOT NULL COMMENT '开始时间'")
    private Date startTime;

    /** 结束时间 */
    @Column(length = 6, nullable = false)
    @Comment("datetime(6) NOT NULL COMMENT '结束时间'")
    private Date endTime;

    /** 班次编码 */
    @Length(max = 255, message = " 班次编码不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT ' 班次编码'")
    private String classesCode;

    /** 班次名称 */
    @NotBlank(message = "班次名称不能为空")
    @Length(max = 255, message = "班次名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '班次名称'")
    private String classesName;

    /** 关联值班管理 */
    @ManyToOne
    private DutyArrangement dutyArrangement;

    /** 关联组 */
    @ManyToOne
    private TeamGroup teamGroup;
}
